import Vue from "vue";
import Router from "vue-router";

import Login from "../page/login";
import Register from "../page/register";
import Home from "../page/home";
import User from "../page/user";
import PaySuccess from "../page/pay_success";
import PayFailure from "../page/pay_failure";
import ShopCart from "../page/shop_cart";
//loushengyue
import ProCategories from '../page/pro-categories'
import Pay from '../page/pay'
import ProSearch from "../page/pro_search";
import ProList from "../page/pro_list";
import ProDetails from "../page/pro_details";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "index"
    },
    {
      path: "/index",
      name: "index",
      component: Home
    },
    {
      path: "/login",
      name: "login",
      component: Login
    },
    {
      path: "/register",
      name: "register",
      component: Register
    },
    {
      path: "/pay_failure",
      name: "pay_failure",
      component: PayFailure
    },
    {
      path: "/user",
      name: "user",
      component: User
    },
    {
      path: "/shop_cart",
      name: "shop_cart",
      component: ShopCart
    },
    {
      path: "/pro_search",
      name: "pro_search",
      component: ProSearch
    },
    {
      path: "/pay_success",
      name: "pay_success",
      component: PaySuccess
    },
    {
      path: "/pro_list",
      name: "pro_list",
      component: ProList
    },
    {
      path: "/pro_details",
      name: "pro_details",
      component: ProDetails
    },
    {
      path: "/proCate",
      name: "proCate",
      component: ProCategories
    },
    {
      path: '/pay',
      name: 'pay',
      component: Pay
    }
  ]
});
